import Layout from '@/views/Layout'
export default [
  {
    path: '/',
    redirect: '/home'
  },
  {
    name: 'login',
    path: '/login',
    component: () => import('@/views/Login')
  },
  // 404 页面
  {
    path: '/404',
    component: () => import('@/views/404'),
    hidden: true
  },
  {
    name: 'layout',
    path: '/loyout',
    component: Layout,
    redirect: '/home',
    children: [
      {
        name: 'home',
        path: '/home',
        component: () => import('@/views/Home'),
        meta: { index: 1 }

      },
      // 工单管理
      {
        name: 'business',
        path: '/task/business',
        component: () => import('@/views/Task/Business.vue'),
        meta: { index: 2 }
      },
      {
        name: 'operation',
        path: '/task/operation',
        component: () => import('@/views/Task/Operation.vue'),
        meta: { index: 3 }
      },
      // 点位管理
      {
        name: 'region',
        path: '/node/region',
        component: () => import('@/views/Node/Region.vue'),
        meta: { index: 4 }
      },
      {
        name: 'node',
        path: '/node/node',
        component: () => import('@/views/Node/Node.vue'),
        meta: { index: 5 }
      },
      {
        name: 'partner',
        path: '/node/partner',
        component: () => import('@/views/Node/Partner.vue'),
        meta: { index: 6 }
      },
      // 设备管理
      {
        name: 'equipment',
        path: '/vm/index',
        component: () => import('@/views/Equipment/Equipment.vue'),
        meta: { index: 7 }
      },
      {
        name: 'status',
        path: '/vm/status',
        component: () => import('@/views/Equipment/Status.vue'),
        meta: { index: 8 }
      },
      {
        name: 'type',
        path: '/vm/type',
        component: () => import('@/views/Equipment/Type.vue'),
        meta: { index: 9 }
      },
      // 人员管理
      {
        name: 'user',
        path: '/user/index',
        component: () => import('@/views/User/User.vue'),
        meta: { index: 10 }
      },
      {
        name: 'user-task-stats',
        path: '/user/user-task-stats',
        component: () => import('@/views/User/UserTaskStats.vue'),
        meta: { index: 11 }
      },
      {
        name: 'user-work',
        path: '/user/user-work',
        component: () => import('@/views/User/UserWork.vue'),
        meta: { index: 12 }
      },
      // 商品管理
      {
        name: 'sku',
        path: '/sku/sku',
        component: () => import('@/views/Sku/Sku.vue'),
        meta: { index: 13 }
      },
      {
        name: 'sku-class',
        path: '/sku/sku-class',
        component: () => import('@/views/Sku/SkuClass.vue'),
        meta: { index: 14 }
      },
      // 策略
      {
        name: 'policy',
        path: '/policy/index',
        component: () => import('@/views/Policy'),
        meta: { index: 15 }
      },
      // 订单
      {
        name: 'order',
        path: '/order/index',
        component: () => import('@/views/Order'),
        meta: { index: 16 }
      },
      // 对账
      {
        name: 'report',
        path: '/report/index',
        component: () => import('@/views/Report'),
        meta: { index: 17 }
      }

    ]
  },
  {
    path: '*',
    redirect: '/404'
  }

]
